package net.wanho.controller;

import lombok.extern.slf4j.Slf4j;
import net.wanho.entity.User;
import net.wanho.vo.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.Date;

/**
 * Author：汤小洋
 * Date：2023-09-25 16:09
 * Description：<描述>
 */
@RestController
public class HelloController {

    @Autowired
    private Date date;

    @RequestMapping("/hello")
    public String hello(){
        return "Hello World555----"+date;
    }

    @RequestMapping("/addUser")
    public AjaxResult addUser(User user){
        System.out.println("------------------------------------");
        user.setId(1001);
        return AjaxResult.success(user);
    }

}
